package nongchang.kuaijiecaifu.com.ncapp_android.ui.adapter;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import butterknife.BindView;
import butterknife.ButterKnife;
import ezy.widget.view.AutofitImageView;
import nongchang.kuaijiecaifu.com.ncapp_android.R;
import nongchang.kuaijiecaifu.com.ncapp_android.common.adapter.ItemAdapter;
import nongchang.kuaijiecaifu.com.ncapp_android.retrofit.good.Good;

/**
 * Created by Administrator on 2016/3/12 0012.
 */
public class GoodsAdapter extends ItemAdapter<Good,GoodsAdapter.GoodsHolder> {
    public GoodsAdapter(Context context) {
        super(context);
    }

    @Override
    public GoodsHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        return new GoodsHolder(inflate(R.layout.item_goods, parent));
    }

    @Override
    public void onBindViewHolder(GoodsHolder holder, int position) {
        Good item = getItem(position);

    }

    static class GoodsHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
        @BindView(R.id.img_good)
        AutofitImageView imgGood;
        @BindView(R.id.txt_title)
        TextView txtTitle;
        @BindView(R.id.txt_content)
        TextView txtContent;
        @BindView(R.id.txt_sum)
        TextView txtSum;
        @BindView(R.id.img_sign1)
        TextView txtSign1;
        @BindView(R.id.img_sign2)
        TextView txtSign2;
        @BindView(R.id.txt_money)
        TextView txtMoney;
        @BindView(R.id.txt_distance)
        TextView txtDistance;

        public GoodsHolder(View itemView) {
            super(itemView);
            ButterKnife.bind(this, itemView);
            itemView.setOnClickListener(this);
        }

        @Override
        public void onClick(View v) {

        }
    }
}
